<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>购物</title>
      <link rel="stylesheet" href="/css/shopping.css">
      <script src="/js/tools.js"></script>
      
    </head>
    <body>
        <header></header>
        <section>
            <div class="container">
                <div class="shopping" id="shopping_car">

                </div>
                <script type="text/html" id="srcShop">
                <table>
                    <thead class="nav_shop">
                    <tr>
                        <th width="160px">
                            <a href="javascript:;" id="edit" class="edit">全选：</a>
                            <input type="checkbox" id="all-check"/>

                        </th>
                        <th width="250px">商品名称</th>
                        <th width="240px">原价</th>
                        <th width="90px">购买数量</th>
                        <th width="200px">单价</th>
                        <th width="200px">小计</th>
                        <th width="200px">编辑</th>
                    </tr>
                </thead>
                
                <tbody class="shop_cont">
                 {{each cartList shop}}
                 <tr data-id="{{shop.id}}" >
                     <td>
                         
                         <input type="checkbox" {{shop.check? 'checked' : '' }} />
                     </td>
                     <td>
                         <a href="/html/detail.html?id={{shop.id}}">
                             <img src="{{shop.photo.url}}" alt=""> 
                         </a>
                         <span>{{shop.title.slice(0,10)}}</span>
                     </td>
                     <td>
                         <span>{{shop.originPrice}}</span>
                     </td>
                     <td>
                         <a href="javascript:;" id="jian" class="minus">-</a>
                         <input type="text" value="{{shop.num}}" class="shop-id">
                         <a href="javascript:;" id="jia" class="plus">+</a>
                     </td>
                     <td>{{(shop.price).toFixed(2)}}</td>
                     <td>{{(shop.price*shop.num).toFixed(2)}}</td>
                     <td><button class="shanchu">删除</button></td>
                 </tr>
                 {{/each}}
                </tbody>
                <tfoot class="shop_submit">
                    <tr>
                        <td width="190px">
                            
                        </td>
                        <td width="800px">
                            <span>商品应付金额：</span>
                            <em>￥</em>
                            <span id="Paymoney"></span>
                        </td>
                        <td width="180px">
                            <a href="/html/payMoney.html" id="indent" >提交订单</a>
                        </td>
                      
                        <td width="120px"></td>
                        <td width="120px"></td>
                        <td width="120px"></td>
                        <td width="120px"></td>
                    </tr>
                </tfoot>
            </table>
                </script>
                <div class="empty">
                    <p><i class="iconfont"></i>你的购物车还没有商品！</p>
                    <a href="/index.html">返回首页</a>
                    <a href="/html/category.html">去选款式</a>
                </div>
            </div>
        </section>
        <footer></footer>
        </body>
        <script src="/libs/require/require.min.js" data-main="/js/shopping"></script>
        </html>
        